package com.guigu.tms.base.controller;

import com.github.pagehelper.PageInfo;
import com.guigu.tms.base.service.IPdTruckDriverService;
import com.guigu.tms.commons.entity.base.BaseTruckType;
import com.guigu.tms.commons.entity.base.PdTruckDriver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 司机表 前端控制器
 * </p>
 *
 * @author wj
 * @since 2022-09-26
 */
@RestController
@RequestMapping("/pdTruckDriver")
public class PdTruckDriverController {

    @Autowired
    IPdTruckDriverService iPdTruckDriverService;

    @PostMapping("/findTruckDriverList")
    public PageInfo<PdTruckDriver> findTruckDriverList(@RequestBody Map<String, String> map){
        return iPdTruckDriverService.findTruckDriverList(map);
    }

    @PutMapping("/UpdateFleetByDriver")
    public int UpdateFleetByDriver(@RequestBody PdTruckDriver pdTruckDriver){
        return iPdTruckDriverService.UpdateFleetByDriver(pdTruckDriver);
    }

    @GetMapping("/ShowInformation")
    public PdTruckDriver ShowInformation(@RequestParam String UserId){
        return iPdTruckDriverService.ShowInformation(UserId);
    }
}
